#include <QCoreApplication>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    int y,x;
    cin>>x;
    if ((x<-2)or(x>2))
    {
    y=x*2;
    cout<<y;
    }
    else
    {
    y=x*(-3);
    cout<<y;
    }
    return a.exec();
}
